<template>
<view class="bg-content">
  <scroll-view scroll-y class="page">
    <view class="bg-white margin padding bg" v-for="item in list" :key="item.id" @tap="gotoDetail(item)">
      <view class="flex">
        <view class="img">
          <image :src="store.avatarUrl"  />
        </view>
        <view class="flex-treble margin-left-sm">
            <view>
              {{store.userName}}
              <view class="flex-sub text-orange text-right fr f1">{{item.verifyTypeName}}</view>
            </view>
           <view class="flex margin-top-xs">
             <view class="flex-sub">{{item.adminLevelName}}</view>
             <view class="flex-sub text-green text-right">{{item.tixianFlagName}}</view>
           </view>
          <view class="flex font_size_24 margin-top-xs">
            <view class="flex-sub">总金额:<font class="f1">￥{{item.totalPrice}}</font></view>
            <view class="flex-sub text-right">核销金额:<font class="f2">￥{{item.totalVerifyPrice}}</font></view>
          </view>
        </view>
      </view>
    </view>
  </scroll-view>
  <view class="text-center padding text-gray">~~~~我是有底线的~~~~</view>
</view>
</template>

<script setup lang="ts">
import {onMounted, ref} from "vue";
import {useStore} from "../../common/store";
import {verify} from '../../common/api/user'
const store = useStore();
const list = ref([]);
const getList = ()=>{
  // store.userId
  verify(330).then(res=>{
    console.log('res:',res)
    list.value = res.data
  })
}

const gotoDetail = (item)=>{
  uni.setStorageSync('v-detail', JSON.stringify(item));
  uni.navigateTo({
    url: `/pages/user/verifyDetail?id=${item.id}`
  })
}

onMounted(async () => {
  getList()
})
</script>

<style lang="scss" scoped>
.page {
  height: 100vh;
}
.bg-content{
  background: #F8F8F8;
  height: 100vh;
  width: 100wh;
  .bg{
    border-radius: 10rpx;
    .img{
      width: 120rpx;
      image{
        width: 120rpx;
        height: 120rpx;
      }
    }


    .font_size_32{
      font-size: 32rpx;

    }
    .font_size_28{
      font-size: 28rpx;
    }
    .font_size_24{
      font-size: 24rpx;
      .f1{
        color: #FF9702;
      }
      .f2{
        color: #FF3A3A;
      }
    }
  }
}
</style>
